/**
 * 认证组件样式模块
 */

// 认证容器
.authWrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  // 移除边框和背景，仅做居中容器
  background: none;
  border: none;
  box-shadow: none;
  
  // 认证卡片
  .authCard {
    // 只做内容排版，不设置边框、背景、阴影
    width: 100%;
    max-width: 420px;
    min-width: 320px;
    padding: 36px 32px 32px 32px;
    border-radius: 0;
    background: none;
    box-shadow: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  
  // 标题区域
  .authHeader {
    margin-bottom: 20px;
    text-align: center;
    
    h2 {
      margin: 0 0 8px;
      font-size: 28px;
      font-weight: 600;
      color: #ffffff;
      letter-spacing: 1px;
    }
    
    p {
      margin: 0;
      font-size: 15px;
      color: #a3b2cc;
    }
  }
}

// 表单
.authForm {
  margin-bottom: 24px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

// 表单行
.formRow {
  display: flex;
  align-items: center;
  margin-bottom: 18px;
  gap: 16px;

  label {
    min-width: 88px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    margin-bottom: 0;
    letter-spacing: 0.5px;
    text-align: right;
  }

  input[type="text"], input[type="email"], input[type="password"] {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid rgba(255,255,255,0.13);
    border-radius: 8px;
    font-size: 14px;
    color: #fff;
    background: rgba(12,15,24,0.44);
    transition: all 0.2s;
    box-sizing: border-box;
    &:focus {
      outline: none;
      border-color: #4a88ff;
      box-shadow: 0 0 0 2px rgba(74,136,255,0.19);
    }
    &:disabled {
      opacity: 0.7;
      cursor: not-allowed;
    }
  }

  .fieldError {
    margin-left: 16px;
    color: #ff6b6b;
    font-size: 12px;
    min-width: 80px;
    flex-shrink: 0;
  }
}

// 表单组
.formGroup {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  
  label {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    letter-spacing: 0.5px;
  }
  
  input, select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 8px;
    font-size: 14px;
    color: #ffffff;
    background-color: rgba(12, 15, 24, 0.44);
    transition: all 0.2s ease;
    margin-bottom: 0;
    box-sizing: border-box;
    
    &:focus {
      outline: none;
      border-color: #4a88ff;
      box-shadow: 0 0 0 2px rgba(74, 136, 255, 0.19);
    }
    
    &:disabled {
      opacity: 0.7;
      cursor: not-allowed;
    }
  }
  
  select {
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23a3b2cc" height="20" viewBox="0 0 24 24" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px 18px;
    padding-right: 40px;
    cursor: pointer;
  }
}

// 角色单选组
.roleRadioGroup {
  display: flex;
  gap: 24px;
}

// 单选项标签
.radioLabel {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: #a3b2cc;
  cursor: pointer;

  input[type="radio"] {
    accent-color: #4a88ff;
    margin-right: 4px;
  }
}

// 表单验证错误
.fieldError {
  margin-top: 3px;
  font-size: 12px;
  color: #ff6b6b;
  min-height: 16px;
}

// 统一错误消息
.authError {
  margin-bottom: 16px;
  padding: 10px;
  border-radius: 8px;
  background-color: rgba(255, 107, 107, 0.1);
  color: #ff6b6b;
  font-size: 14px;
  text-align: center;
}

// 记住我选项行
.formOptions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  
  .checkboxLabel {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #a3b2cc;
    cursor: pointer;
    
    input {
      margin-right: 8px;
    }
  }
  
  .forgotPassword {
    font-size: 14px;
    color: #4a88ff;
    text-decoration: none;
    
    &:hover {
      text-decoration: underline;
    }
  }
}

// 提交按钮
.authButton {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(90deg, #4a88ff, #7f69f8);
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(74, 136, 255, 0.3);
  position: relative;
  overflow: hidden;
  
  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
      90deg,
      transparent,
      rgba(255, 255, 255, 0.2),
      transparent
    );
    transition: left 0.7s ease;
  }
  
  &:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(74, 136, 255, 0.4);
    
    &::before {
      left: 100%;
    }
  }
  
  &:disabled {
    opacity: 0.7;
    cursor: not-allowed;
  }
}

// 分割线
.authDivider {
  margin: 24px 0 18px 0;
  text-align: center;
  // 移除横线
  &::before {
    display: none;
  }
  span {
    position: relative;
    padding: 0 12px;
    background-color: transparent;
    font-size: 14px;
    color: #a3b2cc;
  }
}

// 社交登录区域
.socialLogin {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 18px;
  
  .socialButton {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background-color: rgba(25, 32, 54, 0.7);
    font-size: 14px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    
    &:hover:not(:disabled) {
      border-color: #4a88ff;
      transform: translateY(-2px);
    }
    
    &:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }
    
    i {
      display: inline-block;
      width: 20px;
      height: 20px;
      margin-right: 8px;
      background-size: contain;
      background-repeat: no-repeat;
      background-position: center;
    }
    
    &.github i {
      background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="white" d="M12 0C5.37 0 0 5.37 0 12c0 5.3 3.438 9.8 8.205 11.387.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61-.546-1.387-1.333-1.756-1.333-1.756-1.09-.745.083-.73.083-.73 1.205.085 1.838 1.236 1.838 1.236 1.07 1.835 2.807 1.304 3.49.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.605-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 21.795 24 17.295 24 12c0-6.63-5.37-12-12-12"/></svg>');
    }
    
    &.microsoft i {
      background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 23 23" width="24" height="24"><path fill="%23f25022" d="M1 1h10v10H1z"/><path fill="%2300a4ef" d="M12 1h10v10H12z"/><path fill="%237fba00" d="M1 12h10v10H1z"/><path fill="%23ffb900" d="M12 12h10v10H12z"/></svg>');
    }
  }
}

// 页脚
.authFooter {
  text-align: center;
  margin-top: 8px;
  
  p {
    margin: 0;
    font-size: 14px;
    color: #a3b2cc;
  }
  
  .linkButton {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: #4a88ff;
    cursor: pointer;
    
    &:hover {
      text-decoration: underline;
    }
  }
} 